﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StaticReturn
{
    class Program
    {
        /// <summary>
        /// 输入三个double类型数据，自定义一个静态方法，把这三个数送给它，返回找出的最大数
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            Console.WriteLine("请输入三个实数");
            double num1=Convert.ToDouble(Console.ReadLine());
            double num2 = Convert.ToDouble(Console.ReadLine());
            double num3 = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine($"返回中的最大值为{MyAdd(num1,num2,num3)}");
            Console.ReadKey();
        }
        static double MyAdd (double num1, double num2, double num3)
        {
            
            double temp = Math.Max(num1, num2);
            if (num3>temp)
            {
                return num3;
            }
            else
            {
                return temp;
            }

        }

    }
}
